<?php 

class UserModel extends GenericModel{
	
	public function validateUser($user, $pass, $token){
		$result = $this->query("SELECT 
									COUNT(0) as count
								FROM  
									tab_usuario 
								WHERE 
									nom_usuario = ? 
									AND des_senha = ? 
									AND token = ?", 
								array($user, $pass, $token), TRUE);
		
		if($result['count'] > 0){
			return true;
		}else{
			return false;
		}
	}
	
}

?>